import { ADDUSER} from '../constant';

const initState = [
  {id:1,name:"xixi",age:18}
]
let user = (state=initState,action)=>{
  const {type,data} = action
  switch (type) {
    case ADDUSER:
      return [...state, data]
    default:
      return state
  }
}

export default user
